fix
This commit is contained in:
parent
009c391e44
commit
ebef42aba7
|
|
@ -81,7 +81,7 @@ public class WorkerController extends BaseController {
|
|||
public AjaxResult login(@RequestBody Worker worker){
|
||||
try {
|
||||
Assert.notNull(worker.getPhone(), "手机号码为空");
|
||||
List<Worker> workerList = workerService.getWorkList(worker);
|
||||
List<Worker> workerList = workerService.getWorkByPhoneAndPwd(worker);
|
||||
if(workerList.size() > 0){
|
||||
return AjaxResult.success(workerList.get(0));
|
||||
}else {
|
||||
|
|
|
|||
|
|
@ -346,7 +346,6 @@
|
|||
formatter: function (value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="detail(\'' + row.id + '\')"><i class="fa fa-info"></i>查看</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="orderDetailReject(\'' + row.id + '\')"></i>师傅退单</a> ');
|
||||
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="orderMasterReject(\'' + row.orderMasterId + '\')"></i>商家退单</a> ');
|
||||
if (row.payStatus == 0) {
|
||||
actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="showPayQrcode(\'' + row.id + '\')"></i>付款</a> ');
|
||||
|
|
|
|||
|
|
@ -14,6 +14,12 @@ public interface WorkerMapper {
|
|||
*/
|
||||
List<Worker> getWorkerList(Worker worker);
|
||||
|
||||
/**
|
||||
* @param worker 师傅端
|
||||
* @return 师傅集合
|
||||
*/
|
||||
List<Worker> getWorkByPhoneAndPwd(Worker worker);
|
||||
|
||||
/**
|
||||
* @param worker 师傅信息
|
||||
* @return 新增成功条数
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ public interface WorkerService {
|
|||
*/
|
||||
int updateWorker(Worker worker);
|
||||
|
||||
List<Worker> getWorkByPhoneAndPwd(Worker worker);
|
||||
|
||||
/**
|
||||
* 用师傅ID查询
|
||||
*
|
||||
|
|
|
|||
|
|
@ -45,6 +45,11 @@ public class WorkerServiceImpl implements WorkerService {
|
|||
return workerMapper.updateWorker(worker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Worker> getWorkByPhoneAndPwd(Worker worker) {
|
||||
return workerMapper.getWorkByPhoneAndPwd(worker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Worker selectById(Long workerId) {
|
||||
return workerMapper.selectById(workerId);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,14 @@
|
|||
LEFT JOIN sys_dept_config sdc ON w.dept_id = sdc.dept_id
|
||||
</sql>
|
||||
|
||||
<sql id="selectBasic">
|
||||
SELECT
|
||||
w.worker_id, w.name, w.account, w.phone, w.password, w.open_id, w.dept_id, 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.type, w.store_status, w.alipay_account, w.alipay_name
|
||||
FROM worker w
|
||||
</sql>
|
||||
|
||||
<select id="getWorkerList" parameterType="com.ghy.worker.domain.Worker" resultMap="WorkerResult">
|
||||
<include refid="selectWorker" /> where w.worker_id in (
|
||||
SELECT w.worker_id FROM worker w
|
||||
|
|
@ -96,6 +104,11 @@
|
|||
)
|
||||
</select>
|
||||
|
||||
<select id="getWorkByPhoneAndPwd" parameterType="com.ghy.worker.domain.Worker" resultMap="WorkerResult">
|
||||
<include refid="selectBasic" />
|
||||
where phone = #{phone} and password = #{password}
|
||||
</select>
|
||||
|
||||
<select id="selectById" parameterType="Long" resultMap="WorkerResult">
|
||||
<include refid="selectWorker" /> WHERE worker_id = #{workerId}
|
||||
</select>
|
||||
|
|
|
|||
Loading…
Reference in New Issue