Pārlūkot izejas kodu

update
即时通讯智能体

lifang 3 mēneši atpakaļ
vecāks
revīzija
4d70e1d87c

+ 1 - 1
tr-modules/tr-module-smartFollowUp/src/main/java/cn/tr/module/smart/common/service/impl/BizMissionDocServiceImpl.java

@@ -118,7 +118,7 @@ public class BizMissionDocServiceImpl  implements IBizMissionDocService {
         String MD5 = DigestUtil.md5Hex(JsonUtils.toJsonString(bizMissionDocJsonDTO));
         bizMissionDocPO.setMd5(MD5);
         if(!StrUtil.equals(bizMissionDocPO.getMd5(),oldBizMissionDocPO.getMd5())){
-            bizMissionDocPO.setIsShare(Boolean.TRUE);
+            bizMissionDocPO.setIsShare(Boolean.FALSE);
             bizMissionDocPO.setVersion(oldBizMissionDocPO.getVersion() + 1);
         }
         return baseRepository.updateById(bizMissionDocPO) != 0;

+ 8 - 2
tr-modules/tr-module-system/src/main/java/cn/tr/module/sys/tenant/controller/SysTenantController.java

@@ -12,7 +12,6 @@ import cn.tr.module.sys.tenant.mapper.SysTenantMapper;
 import cn.tr.module.sys.tenant.service.ISysTenantService;
 import cn.tr.module.sys.tenant.vo.SysTenantCommonVO;
 import cn.tr.plugin.mybatis.base.BaseController;
-import cn.tr.plugin.security.context.LoginUserContextHolder;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
@@ -20,7 +19,6 @@ import lombok.AllArgsConstructor;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.*;
 
-import java.util.Collection;
 import java.util.List;
 /**
  * 医院列表控制器
@@ -57,6 +55,7 @@ public class SysTenantController extends BaseController{
     @ApiOperation(value="添加医院列表(超管)",notes = "权限: sys:tenant:add")
     @PostMapping("/add")
     @SaCheckPermission("sys:tenant:add")
+    @TenantIgnore
     public CommonResult<Boolean> add(@RequestBody@Validated(Insert.class) SysTenantAddDTO source) {
         return CommonResult.success(sysTenantService.insertSysTenant(source));
     }
@@ -84,4 +83,11 @@ public class SysTenantController extends BaseController{
         source.setId(LoginUserStrategy.tr.getTenantId());
         return CommonResult.success(sysTenantService.updateSysTenantById(SysTenantMapper.INSTANCE.toAddTOPO(source)));
     }
+
+    @ApiOperationSupport(author = "lf",order = 4)
+    @ApiOperation(value="查询医院的小程序二维码",notes = "权限: 无")
+    @PostMapping("/queryQCode/{tenantId}")
+    public CommonResult<String> edit(@PathVariable("tenantId") String tenantId) {
+        return CommonResult.success(null);
+    }
 }

+ 1 - 1
tr-modules/tr-module-system/src/main/java/cn/tr/module/sys/tenant/po/SysInviteCodePO.java

@@ -17,5 +17,5 @@ public class SysInviteCodePO {
     @TableId
     private String code;
 
-    private Boolean use;
+    private Integer status;
 }

+ 1 - 1
tr-modules/tr-module-system/src/main/java/cn/tr/module/sys/tenant/repository/SysInviteCodeRepository.java

@@ -21,6 +21,6 @@ public interface SysInviteCodeRepository extends BaseMapper<SysInviteCodePO> {
      *
      * @return 随机邀请码对象
      */
-    @Select("SELECT * FROM sys_invite_code where use =0 ORDER BY RANDOM() LIMIT 1")
+    @Select("SELECT * FROM sys_invite_code WHERE status = 0 ORDER BY RANDOM() LIMIT 1")
     SysInviteCodePO selectRandomOne();
 }

+ 1 - 1
tr-modules/tr-module-system/src/main/java/cn/tr/module/sys/tenant/service/impl/SysTenantServiceImpl.java

@@ -109,7 +109,7 @@ public class SysTenantServiceImpl implements ISysTenantService {
         SysTenantPO tenant = SysTenantMapper.INSTANCE.toPO(source);
         SysInviteCodePO inviteCode=inviteCodeRepository.selectRandomOne();
         tenant.setInviteCode(inviteCode.getCode());
-        inviteCode.setUse(Boolean.TRUE);
+        inviteCode.setStatus(1);
         inviteCodeRepository.updateById(inviteCode);
         return tenantRepository.insert(tenant) != 0;
     }

+ 2 - 1
tr-modules/tr-module-system/src/main/resources/mapper/tenant/SysTenantMapper.xml

@@ -14,6 +14,7 @@
         <result column="invite_code" property="inviteCode"/>
         <result column="code" property="code"/>
         <result column="tenant_avatar" property="tenantAvatar"/>
+        <result column="create_time" property="createTime"/>
     </resultMap>
 
     <select id="stdSelectList" resultMap="CommonResult" parameterType="cn.tr.module.sys.tenant.dto.SysTenantQueryDTO">
@@ -28,7 +29,7 @@
         t.avatar as tenant_avatar,
         t.remark as  remark,
         t.avatar as tenant_avatar,
-        t.create_time,
+        t.create_time as create_,
         u.username as username
         from
         sys_tenant as t