Commit 42a077b6 by zhiwj

Merge branch 'developer' of…

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-data-cloud into developer
parents 279314bd 5be7dc59
......@@ -43,6 +43,8 @@ public class FunctionModuleDTO implements Serializable{
*/
private String operationName;
private String logo;
/**
* 1:有效 0:无效
*/
......@@ -138,4 +140,13 @@ public class FunctionModuleDTO implements Serializable{
this.updateTime = updateTime;
return this;
}
public String getLogo() {
return logo;
}
public FunctionModuleDTO setLogo(String logo) {
this.logo = logo;
return this;
}
}
......@@ -19,4 +19,6 @@ public interface DataAuthApiService {
ServiceResponse<Page<DataAuthDTO>> pageDataAuth(Integer enterpriseId, String dataAuthName, Integer currentPage, Integer pageSize);
ServiceResponse<List<DataAuthDTO>> listDataAuth(Integer enterpriseId, String dataAuthName);
ServiceResponse<DataAuthDTO> ggetDataAuthByUserId(Integer enterpriseId, Integer userId);
}
......@@ -36,6 +36,8 @@ public class FunctionModuleVO implements Serializable{
*/
private String operationName;
private String logo;
/**
* 1:有效 0:无效
*/
......@@ -131,4 +133,13 @@ public class FunctionModuleVO implements Serializable{
this.updateTime = updateTime;
return this;
}
public String getLogo() {
return logo;
}
public FunctionModuleVO setLogo(String logo) {
this.logo = logo;
return this;
}
}
......@@ -36,6 +36,8 @@ public class TabSysFunctionModule {
*/
private String operationName;
private String logo;
/**
* 1:有效 0:无效
*/
......@@ -131,4 +133,13 @@ public class TabSysFunctionModule {
this.updateTime = updateTime;
return this;
}
public String getLogo() {
return logo;
}
public TabSysFunctionModule setLogo(String logo) {
this.logo = logo;
return this;
}
}
\ No newline at end of file
......@@ -5,6 +5,7 @@ import com.gic.api.base.commons.ServiceResponse;
import com.gic.cloud.dto.DataAuthDTO;
import com.gic.cloud.dto.UserDTO;
import com.gic.cloud.entity.TabSysDataAuth;
import com.gic.cloud.entity.TabSysUser;
import com.gic.cloud.service.DataAuthApiService;
import com.gic.cloud.service.DataAuthService;
import com.gic.cloud.service.UserService;
......@@ -90,6 +91,15 @@ public class DataAuthApiServiceImpl implements DataAuthApiService{
dataAuthService.listDataAuth(enterpriseId, dataAuthName))).orElse(Collections.EMPTY_LIST));
}
@Override
public ServiceResponse<DataAuthDTO> ggetDataAuthByUserId(Integer enterpriseId, Integer userId) {
TabSysUser user = userService.getUser(userId);
if (user == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "用户ID错误,查无数据");
}
return getDataAuth(user.getDataAuthId());
}
private ServiceResponse validParam(DataAuthDTO dto) {
if (dto.getDataAuthId() != null) {
TabSysDataAuth record = dataAuthService.getDataAuth(dto.getDataAuthId());
......
......@@ -8,13 +8,14 @@
<result column="function_module_desc" jdbcType="VARCHAR" property="functionModuleDesc" />
<result column="operation_id" jdbcType="VARCHAR" property="operationId" />
<result column="operation_name" jdbcType="VARCHAR" property="operationName" />
<result column="logo" jdbcType="VARCHAR" property="logo" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
function_module_id, function_module_name, function_module_code, function_module_desc,
operation_id, operation_name, status, create_time, update_time
operation_id, operation_name, logo, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
......@@ -29,11 +30,11 @@
<insert id="insert" parameterType="com.gic.cloud.entity.TabSysFunctionModule" useGeneratedKeys="true" keyProperty="functionModuleId">
insert into tab_sys_function_module (function_module_id, function_module_name,
function_module_code, function_module_desc,
operation_id, operation_name, status,
operation_id, operation_name, logo, status,
create_time, update_time)
values (#{functionModuleId,jdbcType=INTEGER}, #{functionModuleName,jdbcType=VARCHAR},
#{functionModuleCode,jdbcType=VARCHAR}, #{functionModuleDesc,jdbcType=VARCHAR},
#{operationId,jdbcType=VARCHAR}, #{operationName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{operationId,jdbcType=VARCHAR}, #{operationName,jdbcType=VARCHAR}, #{logo,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.cloud.entity.TabSysFunctionModule">
......@@ -57,6 +58,9 @@
<if test="operationName != null">
operation_name,
</if>
<if test="logo != null">
logo,
</if>
<if test="status != null">
status,
</if>
......@@ -86,6 +90,9 @@
<if test="operationName != null">
#{operationName,jdbcType=VARCHAR},
</if>
<if test="logo != null">
#{logo,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
......@@ -115,6 +122,9 @@
<if test="operationName != null">
operation_name = #{operationName,jdbcType=VARCHAR},
</if>
<if test="logo != null">
logo = #{logo,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
......@@ -134,6 +144,7 @@
function_module_desc = #{functionModuleDesc,jdbcType=VARCHAR},
operation_id = #{operationId,jdbcType=VARCHAR},
operation_name = #{operationName,jdbcType=VARCHAR},
logo = #{logo,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
......
......@@ -22,6 +22,8 @@ public class FunctionModuleVO implements Serializable{
*/
private String functionModuleDesc;
private String logo;
public String getFunctionModuleName() {
......@@ -51,4 +53,12 @@ public class FunctionModuleVO implements Serializable{
return this;
}
public String getLogo() {
return logo;
}
public FunctionModuleVO setLogo(String logo) {
this.logo = logo;
return this;
}
}
......@@ -29,8 +29,7 @@ import org.springframework.context.annotation.ImportResource;
"classpath*:dubbo-setting.xml",
"classpath*:dubbo-gic-data-cloud-wxapp.xml",
"classpath*:spring-interceptor.xml",
"classpath*:redis-init.xml",
"classpath:web-common-spring.xml"
"classpath*:redis-init.xml"
})
public class Main {
......
package com.gic.cloud.web.auth;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.cloud.dto.DataAuthDTO;
import com.gic.cloud.service.DataAuthApiService;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Component
public class DataAuthUtils {
private static final Logger log = LogManager.getLogger(DataAuthUtils.class);
@Autowired
private DataAuthApiService dataAuthApiService;
public void getUserAuth(Integer userId, Integer enterpriseId){
ServiceResponse<DataAuthDTO> response = this.dataAuthApiService.ggetDataAuthByUserId(enterpriseId, userId);
if(response.isSuccess()){
DataAuthDTO dataAuthDTO = response.getResult();
}
}
}
......@@ -32,7 +32,7 @@ public class LoginController {
@RequestMapping("send-code")
public RestResponse sendCode(String phoneNumber, String areaCode){
String smsSenceId = "GYT0001";
List<UserDTO> userDTOList = this.userApiService.listUserByPhone("86", phoneNumber).getResult();
List<UserDTO> userDTOList = this.userApiService.listUserByPhone("+"+areaCode, phoneNumber).getResult();
if(CollectionUtils.isNotEmpty(userDTOList)){
Integer enterpriseId = userDTOList.get(0).getEnterpriseId();
String code = CreateRandomUtils.getStringRandom(4);
......
package com.gic.cloud.web.controller;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class StoreAttentionController {
}
package com.gic.cloud.web.controller;
import com.gic.commons.webapi.reponse.RestResponse;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class StoreWidgetController {
@RequestMapping("store-widget-index")
public RestResponse storeWidgetIndex(Integer userId, Integer enterpriseId){
return null;
}
}
......@@ -73,7 +73,6 @@
<dubbo:reference interface="com.gic.wechat.business.api.service.fwh.WeixinBaseFunService" id="weixinBaseFunService" timeout="6000" />
<dubbo:reference interface="com.gic.wechat.business.api.service.wxa.WeixinWxaFunService" id="weixinWxaFunService" timeout="6000" />
<!--用户-->
<dubbo:reference interface="com.gic.auth.service.UserApiService" id="userApiService" timeout="6000" />
<dubbo:reference interface="com.gic.marketing.api.service.sms.SmsOuterApiService" id="smsOuterApiService" timeout="6000" />
<!--短信-->
<!--首页配置-->
......@@ -138,5 +137,7 @@
<dubbo:reference interface="com.gic.goods.pump.api.service.WeiMobGoodsService" id="weiMobGoodsService" timeout="60000" />
<dubbo:reference interface="com.gic.member.config.api.service.OrderPointCalculationPartyApiService" id="orderPointCalculationPartyApiService" timeout="60000" />
<dubbo:reference interface="com.gic.open.api.service.EnterpriseLicenseApiService" id="enterpriseLicenseApiService" timeout="6000" retries="0"/>
<dubbo:reference interface="com.gic.cloud.service.DataAuthApiService" id="dataAuthApiService" timeout="6000" retries="0"/>
<dubbo:reference interface="com.gic.cloud.service.UserApiService" id="userApiService" timeout="6000" retries="0"/>
<dubbo:reference interface="com.gic.marketing.process.api.service.sms.SmsSendApiService" id="smsSendApiService" timeout="6000" retries="0"/>
</beans>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment