|
@@ -1,8 +1,15 @@
|
|
|
package com.pj.tb_enterprise;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
+import java.util.Objects;
|
|
|
+
|
|
|
+import cn.dev33.satoken.stp.StpUtil;
|
|
|
+import cn.hutool.core.date.DateUtil;
|
|
|
+import com.pj.common.core.utils.DateUtils;
|
|
|
import com.pj.utils.so.SoMap;
|
|
|
+import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -25,6 +32,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
@RequestMapping("/TbEnterprise/")
|
|
|
public class TbEnterpriseController {
|
|
|
|
|
|
+
|
|
|
/** 底层 Service 对象 */
|
|
|
@Autowired
|
|
|
TbEnterpriseService tbEnterpriseService;
|
|
@@ -123,10 +131,43 @@ public class TbEnterpriseController {
|
|
|
}
|
|
|
return AjaxJson.getError();
|
|
|
}
|
|
|
-
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+ /**
|
|
|
+ *商户审核
|
|
|
+ *
|
|
|
+ * @author loovi
|
|
|
+ * @date
|
|
|
+ */
|
|
|
+ @RequestMapping("audit")
|
|
|
+ @SaCheckPermission(TbEnterprise.PERMISSION_CODE_EDIT)
|
|
|
+ public AjaxJson audit(TbEnterprise t){
|
|
|
|
|
|
+ Long loginId = StpUtil.getLoginIdAsLong();
|
|
|
+ TbEnterprise tbEnterprise = tbEnterpriseService.getById(t.getId());
|
|
|
+ if(Objects.isNull(tbEnterprise)){
|
|
|
+ return AjaxJson.getSuccess("该商户不存在");
|
|
|
+ }
|
|
|
+ BeanUtils.copyProperties(t,tbEnterprise);
|
|
|
+ tbEnterprise.setUpdateBy(String.valueOf(loginId));
|
|
|
+ tbEnterpriseService.update(t);
|
|
|
+ return AjaxJson.getSuccess();
|
|
|
+ }
|
|
|
+ /**
|
|
|
+ *是否锁住商户
|
|
|
+ *
|
|
|
+ * @author loovi
|
|
|
+ * @date
|
|
|
+ */
|
|
|
+ @RequestMapping("isLock")
|
|
|
+ @SaCheckPermission(TbEnterprise.PERMISSION_CODE_EDIT)
|
|
|
+ public AjaxJson isLock(Long id, Integer isLock) {
|
|
|
+ Long loginId = StpUtil.getLoginIdAsLong();
|
|
|
+ TbEnterprise tbEnterprise = tbEnterpriseService.getById(id);
|
|
|
+ if (Objects.isNull(tbEnterprise)) {
|
|
|
+ return AjaxJson.getSuccess("该商户不存在");
|
|
|
+ }
|
|
|
+ int line = SP.publicMapper.updateColumnById(TbEnterprise.TABLE_NAME, "is_lock", isLock, id);
|
|
|
+ tbEnterprise.setUpdateBy(String.valueOf(loginId));
|
|
|
+ return AjaxJson.getByLine(line);
|
|
|
+ }
|
|
|
}
|