3 Commits

  1. 1
      src/main/java/com/example/demo/domain/dou/Total.java
  2. 2
      src/main/java/com/example/demo/serviceImpl/OtherServiceImpl.java
  3. 3
      src/main/java/com/example/demo/serviceImpl/UserServiceImpl.java
  4. 14
      src/main/resources/mapper/StatisticsMapper.xml
  5. 4
      src/main/resources/mapperLink/DouMapper.xml

1
src/main/java/com/example/demo/domain/dou/Total.java

@ -17,6 +17,7 @@ public class Total {
private String orderNo;
private String type;
private String ipAddress;
private String deptName;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date startTime;

2
src/main/java/com/example/demo/serviceImpl/OtherServiceImpl.java

@ -98,9 +98,9 @@ public class OtherServiceImpl implements OtherService {
typesToUpdateOne.add("43");
typesToUpdateOne.add("50");
typesToUpdateOne.add("51");
typesToUpdateOne.add("52");
typesToUpdateOne.add("62");
typesToUpdateTwo.add("52");
typesToUpdateTwo.add("55");
typesToUpdateTwo.add("56");
typesToUpdateTwo.add("57");

3
src/main/java/com/example/demo/serviceImpl/UserServiceImpl.java

@ -9,6 +9,7 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils;
@ -58,6 +59,8 @@ public class UserServiceImpl implements UserSevice {
if (!ObjectUtils.isEmpty(sUser)){
throw new Exception("已存在此用户");
}
BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
user.setPassword(passwordEncoder.encode("123"));
return userMapper.add(user);
}

14
src/main/resources/mapper/StatisticsMapper.xml

@ -124,4 +124,18 @@
</if>
GROUP BY DATE_FORMAT(create_time, '%Y-%m-%d')
</select>
<select id="getMediuPayCoinday" resultType="com.example.demo.domain.vo.SumCoin">
SELECT
DATE_FORMAT(create_time, '%Y-%m-%d') AS day,
IFNULL(SUM(recharge_coin) / 100, 0) AS rechargeSumCoin,
IFNULL(SUM(free_coin) / 100, 0) AS freeSumCoin,
IFNULL(SUM(task_coin) / 100, 0) AS taskSumCoin
FROM
detail_y
WHERE
DATE(create_time) = #{searchEndTime}
AND update_type = #{updateType}
GROUP BY
DATE_FORMAT(create_time, '%Y-%m-%d')
</select>
</mapper>

4
src/main/resources/mapperLink/DouMapper.xml

@ -209,8 +209,8 @@
<if test="type != null and type.length > 0">
and type LIKE CONCAT('%', #{type}, '%')
</if>
<if test="ipAddress != null and ipAddress.length > 0">
and fm.ip_address = #{ipAddress}
<if test="deptName != null and deptName.length > 0">
and fm.ip_address = #{deptName}
</if>
<if test="startTime != null and endTime != null">
and FROM_UNIXTIME(fy.`time`) BETWEEN #{startTime} AND #{endTime}

Loading…
Cancel
Save