师傅端 更新师傅服务商、供应商
This commit is contained in:
parent
830f8136cc
commit
8735f748d5
|
|
@ -47,7 +47,7 @@ public class WorkerController extends BaseController {
|
||||||
public AjaxResult updateWorker(@RequestBody Worker worker){
|
public AjaxResult updateWorker(@RequestBody Worker worker){
|
||||||
try {
|
try {
|
||||||
workerService.updateWorker(worker);
|
workerService.updateWorker(worker);
|
||||||
return AjaxResult.success("");
|
return AjaxResult.success("修改成功");
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
logger.error(ExceptionUtil.getExceptionMessage(e));
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
return AjaxResult.error(e.getMessage());
|
return AjaxResult.error(e.getMessage());
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,9 @@ public class Worker extends BaseEntity {
|
||||||
@Excel(name = "密码", cellType = Excel.ColumnType.STRING)
|
@Excel(name = "密码", cellType = Excel.ColumnType.STRING)
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
@Excel(name = "0 服务商 1供应商", cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
@Excel(name = "微信open_id", cellType = Excel.ColumnType.STRING)
|
@Excel(name = "微信open_id", cellType = Excel.ColumnType.STRING)
|
||||||
private String openId;
|
private String openId;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@
|
||||||
<result property="openId" column="open_id" />
|
<result property="openId" column="open_id" />
|
||||||
<result property="password" column="password" />
|
<result property="password" column="password" />
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status" />
|
||||||
|
<result property="type" column="type" />
|
||||||
<result property="deptName" column="dept_name"/>
|
<result property="deptName" column="dept_name"/>
|
||||||
<result property="deptId" column="dept_id"/>
|
<result property="deptId" column="dept_id"/>
|
||||||
<result property="workerLogoUrl" column="worker_logo_url" />
|
<result property="workerLogoUrl" column="worker_logo_url" />
|
||||||
|
|
@ -25,7 +26,7 @@
|
||||||
<sql id="selectWorker">
|
<sql id="selectWorker">
|
||||||
SELECT
|
SELECT
|
||||||
w.worker_id, w.name, w.account, w.phone, w.password, w.open_id, w.dept_id, sd.dept_name, w.status, w.worker_logo_url,
|
w.worker_id, w.name, w.account, w.phone, w.password, w.open_id, w.dept_id, sd.dept_name, w.status, w.worker_logo_url,
|
||||||
w.leader_team_rate, w.leader_team_money, w.create_by, w.create_time, w.update_by, w.update_time, w.remark
|
w.leader_team_rate, w.leader_team_money, w.create_by, w.create_time, w.update_by, w.update_time, w.remark, w.type
|
||||||
FROM worker w
|
FROM worker w
|
||||||
LEFT JOIN sys_dept sd ON w.dept_id = sd.dept_id
|
LEFT JOIN sys_dept sd ON w.dept_id = sd.dept_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
@ -74,6 +75,7 @@
|
||||||
<update id="updateWorker" >
|
<update id="updateWorker" >
|
||||||
update worker
|
update worker
|
||||||
<set>
|
<set>
|
||||||
|
<if test="type != null"> type = #{type},</if>
|
||||||
<if test="account != null and account != ''"> account = #{account},</if>
|
<if test="account != null and account != ''"> account = #{account},</if>
|
||||||
<if test="phone != null and phone != ''"> phone = #{phone},</if>
|
<if test="phone != null and phone != ''"> phone = #{phone},</if>
|
||||||
<if test="leaderTeamRate != null and leaderTeamRate != ''"> leader_team_rate = #{leaderTeamRate},</if>
|
<if test="leaderTeamRate != null and leaderTeamRate != ''"> leader_team_rate = #{leaderTeamRate},</if>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue