Commit c6a68a2e by wangming

Merge branch 'wangming' into '105'

初始化

See merge request !2
2 parents 65f22f20 1430e9be
......@@ -13,15 +13,14 @@ import java.util.Map;
* 用户管理
*/
@RestController
@RequestMapping(BaseController.OSS_NAMESPACE + "/sjuser")
public class SjUserController extends BaseController {
@RequestMapping(BaseController.OSS_NAMESPACE + "/kzyUser")
public class KzyUserController extends BaseController {
/**
* 用户列表
* @param fullName
* @param nickName
* @param department
* @param duty
* @param phone
* @param pageNo
* @param pageSize
......@@ -29,19 +28,16 @@ public class SjUserController extends BaseController {
*/
@ResponseBody
@RequestMapping(path = "/list", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map list(@RequestParam(defaultValue = "") String fullName,@RequestParam(defaultValue = "") String nickName,
@RequestParam(defaultValue = "") String department,@RequestParam(defaultValue = "") String phone
public Map list(@RequestParam(defaultValue = "") String fullName,
@RequestParam(defaultValue = "") String duty,@RequestParam(defaultValue = "") String phone
,@RequestParam(defaultValue = "1") Integer pageNo, @RequestParam(defaultValue = "1") Integer pageSize) {
try {
Map paramMap = new HashMap<>();
if(!("").equals(fullName)){
paramMap.put("fullName","%"+fullName+"%");
}
if(!("").equals(nickName)){
paramMap.put("nickName","%"+nickName+"%");
}
if(!("").equals(department)){
paramMap.put("department","%"+department+"%");
if(!("").equals(duty)){
paramMap.put("duty","%"+duty+"%");
}
if(!("").equals(phone)){
paramMap.put("phone",phone);
......@@ -59,4 +55,31 @@ public class SjUserController extends BaseController {
}
}
/**
* 积分列表
* @param id
* @param pageNo
* @param pageSize
* @return
*/
@ResponseBody
@RequestMapping(path = "/integralList", method = {RequestMethod.POST, RequestMethod.GET}, produces = "application/json")
public Map integralList(@RequestParam(defaultValue = "") Long id,@RequestParam(defaultValue = "1") Integer pageNo, @RequestParam(defaultValue = "1") Integer pageSize) {
try {
Map paramMap = new HashMap<>();
paramMap.put("id",id);
PageHelper.startPage(pageNo,pageSize,true,false);
List list = openSqlRingsService.selectList_Rings("com.mapping.queryModel.queryUserIntegral",paramMap);
PageInfo pageInfo = new PageInfo(list);
PageModel model = new PageModel();
model.setTotal(pageInfo.getTotal());
model.setList(list);
return success(model);
} catch (Exception e) {
e.printStackTrace();
return error("0","系统异常",null);
}
}
}
......@@ -21,6 +21,44 @@
</select>
<select id="queryUser" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT
t.id,
t.full_name as fullName,
t.phone,
t.duty,
t.integral,
t.user_category as userCategory,
t.head_photo as headPhoto,
date_format(t.create_dt,'%Y-%m-%d %H:%i:%S') createDt
FROM
t_kzy_user t
WHERE
1 = 1
<if test="fullName != null">
AND t.full_name LIKE #{fullName}
</if>
<if test="duty != null">
AND t.duty LIKE #{duty}
</if>
<if test="phone != null">
AND t.phone = #{phone}
</if>
ORDER BY t.create_dt DESC
</select>
<select id="queryUserIntegral" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT
t.id,
t.integral,
t.source_type as sourceType,
t.remark,
date_format(t.create_dt,'%Y-%m-%d %H:%i:%S') createDt
FROM
t_kzy_user_integral_flowing t
WHERE
t.user_id = #{id,jdbcType=BIGINT}
ORDER BY t.create_dt DESC
</select>
</mapper>
\ No newline at end of file
......@@ -2,7 +2,8 @@ server.port=${port:8081}
server.tomcat.max-threads=1000
spring.application.name=kzy-oss
spring.datasource.driverClassName = com.mysql.jdbc.Driver
spring.datasource.url = jdbc:mysql://39.97.246.118:3306/kzy_db_test?useUnicode=true&characterEncoding=utf-8
#spring.datasource.url = jdbc:mysql://39.97.246.118:3306/kzy_db_test?useUnicode=true&characterEncoding=utf-8
spring.datasource.url = jdbc:mysql://192.168.20.183:3306/kzy_db_test?useUnicode=yes&characterEncoding=utf-8
spring.datasource.username = kzy_user
spring.datasource.password = Kzy2020#yY
......@@ -22,7 +23,8 @@ mybatis.config-location=classpath:mybatis/mybatis-config.xml
# Redis数据库索引(默认为0)
spring.redis.database=0
# Redis服务器地址
spring.redis.host=192.168.0.105
spring.redis.host=192.168.20.183
#spring.redis.host=39.97.246.118
# Redis服务器连接端口
spring.redis.port=6379
# Redis服务器连接密码(默认为空)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!