xuhy
2023-02-24 01e64fe75bb1914c00ac2da749511296c6588f96
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAgentController.java
@@ -2,6 +2,9 @@
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.stylefeng.guns.core.base.controller.BaseController;
import com.stylefeng.guns.core.base.tips.SuccessTip;
import com.stylefeng.guns.core.exception.GunsException;
import com.stylefeng.guns.core.exception.ServiceExceptionEnum;
import com.stylefeng.guns.core.util.DateUtil;
import com.stylefeng.guns.modular.system.controller.resp.TAgentResp;
import com.stylefeng.guns.modular.system.controller.util.ExcelUtil;
@@ -127,6 +130,12 @@
    @RequestMapping(value = "/add")
    @ResponseBody
    public Object add(TAgent tAgent) {
        int count = tAgentService.selectCount(new EntityWrapper<TAgent>().eq("principalPhone", tAgent.getPrincipalPhone()));
        if(count>0){
            return new SuccessTip(500,"该代理商已存在!");
        }
        String[] split = tAgent.getAreaId().split("/");
        // 查询省市
        // 黑龙江省/大兴安岭地区