入驻接口修改,增加实名认证接口
This commit is contained in:
parent
950c3aa95d
commit
207795e7d6
|
|
@ -15,11 +15,9 @@ import com.ghy.web.pojo.vo.WorkerListResponse;
|
||||||
import com.ghy.web.pojo.vo.WorkerSettledRequest;
|
import com.ghy.web.pojo.vo.WorkerSettledRequest;
|
||||||
import com.ghy.worker.domain.Worker;
|
import com.ghy.worker.domain.Worker;
|
||||||
import com.ghy.worker.domain.WorkerArea;
|
import com.ghy.worker.domain.WorkerArea;
|
||||||
|
import com.ghy.worker.domain.WorkerBank;
|
||||||
import com.ghy.worker.domain.WorkerGoodsCategory;
|
import com.ghy.worker.domain.WorkerGoodsCategory;
|
||||||
import com.ghy.worker.service.WorkerAreaService;
|
import com.ghy.worker.service.*;
|
||||||
import com.ghy.worker.service.WorkerGoodsCategoryService;
|
|
||||||
import com.ghy.worker.service.WorkerService;
|
|
||||||
import com.ghy.worker.service.WorkerSpecialSkillService;
|
|
||||||
import org.apache.commons.collections.CollectionUtils;
|
import org.apache.commons.collections.CollectionUtils;
|
||||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||||
import org.apache.shiro.util.Assert;
|
import org.apache.shiro.util.Assert;
|
||||||
|
|
@ -57,6 +55,9 @@ public class WorkerController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private GoodsService goodsService;
|
private GoodsService goodsService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private WorkerBankService workerBankService;
|
||||||
|
|
||||||
@RequiresPermissions("worker:worker:view")
|
@RequiresPermissions("worker:worker:view")
|
||||||
@GetMapping()
|
@GetMapping()
|
||||||
public String worker(){
|
public String worker(){
|
||||||
|
|
@ -212,6 +213,32 @@ public class WorkerController extends BaseController {
|
||||||
// 入驻服务品类信息持久化
|
// 入驻服务品类信息持久化
|
||||||
workerGoodsCategoryService.updateWorkerGoodsCategory(request.getWorkerId(), request.getGoodsCategories());
|
workerGoodsCategoryService.updateWorkerGoodsCategory(request.getWorkerId(), request.getGoodsCategories());
|
||||||
// 入驻特殊技能信息持久化
|
// 入驻特殊技能信息持久化
|
||||||
|
// specialSkillService.updateWorkerSpecialSkill(request.getWorkerId(), request.getSpecialSkills());
|
||||||
|
// 更新师傅状态为审核中
|
||||||
|
// Worker worker = new Worker();
|
||||||
|
// worker.setWorkerId(request.getWorkerId());
|
||||||
|
// worker.setStatus(WorkerStatus.AUDITING.getCode());
|
||||||
|
// workerService.updateWorker(worker);
|
||||||
|
return AjaxResult.success("保存成功");
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
logger.error(ExceptionUtil.getExceptionMessage(e));
|
||||||
|
return AjaxResult.error(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/certify")
|
||||||
|
@ResponseBody
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public AjaxResult certify(@RequestBody WorkerSettledRequest request) {
|
||||||
|
try {
|
||||||
|
// 校验是否已绑定银行信息
|
||||||
|
WorkerBank workerBank = workerBankService.getByWorkerId(request.getWorkerId());
|
||||||
|
if (workerBank == null) {
|
||||||
|
return AjaxResult.error("银行卡未绑定");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 入驻特殊技能信息持久化
|
||||||
specialSkillService.updateWorkerSpecialSkill(request.getWorkerId(), request.getSpecialSkills());
|
specialSkillService.updateWorkerSpecialSkill(request.getWorkerId(), request.getSpecialSkills());
|
||||||
// 更新师傅状态为审核中
|
// 更新师傅状态为审核中
|
||||||
Worker worker = new Worker();
|
Worker worker = new Worker();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue