Commit c0fa4d7d authored by m1991's avatar m1991

Merge remote-tracking branch 'origin/master'

parents e24177fa 06fc9a82
...@@ -26,7 +26,7 @@ public class ImageUtil { ...@@ -26,7 +26,7 @@ public class ImageUtil {
BufferedImage image = new BufferedImage(bgWidth, bgHeight, BufferedImage.TYPE_INT_RGB); BufferedImage image = new BufferedImage(bgWidth, bgHeight, BufferedImage.TYPE_INT_RGB);
Graphics2D g = image.createGraphics(); Graphics2D g = image.createGraphics();
g.drawImage(srcImage, 0, 0, bgWidth, bgHeight, null); g.drawImage(srcImage, 0, 0, bgWidth, bgHeight, null);
g.drawImage(waterImage, bgWidth - 150, bgHeight - 150, waterImage.getWidth(), waterImage.getHeight(), null); g.drawImage(waterImage, bgWidth - 200, bgHeight - 200, waterImage.getWidth(), waterImage.getHeight(), null);
g.dispose(); g.dispose();
ByteArrayOutputStream out = new ByteArrayOutputStream(); ByteArrayOutputStream out = new ByteArrayOutputStream();
ImageIO.write(image, "jpg", out); ImageIO.write(image, "jpg", out);
......
...@@ -90,34 +90,22 @@ ...@@ -90,34 +90,22 @@
</where> </where>
</select> </select>
<select id="getByUserIdAndTime" resultType="cn.wisenergy.model.app.TradeRecord">
select
<include refid="cols_all"/>
from
<include refid="table"/>
<where>
trade_type !=1
<if test="userId">
and user_id=#{userId}
</if>
<if test="yearMonth != null">
AND(
YEAR(create_time) = YEAR(#{yearMonth})
AND MONTH(create_time) = MONTH(#{yearMonth}))
</if>
</where>
</select>
<select id="getSixMonthIncome" resultType="cn.wisenergy.model.vo.AccumulatedIncomeVo"> <select id="getSixMonthIncome" resultType="cn.wisenergy.model.vo.AccumulatedIncomeVo">
SELECT user_id as userId,sum(money) as income , select a.user_id as userId,a.money as income,date_format(a.create_time,'%Y-%m') as yearMonth
date_format(create_time,'%Y-%m') as yearMonth FROM trade_record as a right join (SELECT user_id ,trade_type,
date_format(create_time,'%Y-%m'),max(create_time) as time
FROM FROM
<include refid="table"/> <include refid="table"/>
WHERE date_format(create_time,'%Y-%m') &lt;= date_format(now(),'%Y-%m') WHERE date_format(create_time,'%Y-%m') &lt;= date_format(now(),'%Y-%m')
and date_format(create_time,'%Y-%m') >= date_format(now() - interval 5 month,'%Y-%m') and date_format(create_time,'%Y-%m') >= date_format(now() - interval 5 month,'%Y-%m')
and (status=1 or status=0) and (status=1 or status=0)
and user_id=#{userId} and user_id=#{userId}
group by user_id ,create_time; and trade_type in(2,4,5,7,8)
group by user_id ,trade_type,date_format(create_time,'%Y-%m')) as b on
a.user_id= b.user_id
and a.trade_type=b.trade_type
and a.create_time =b.time
ORDER BY b.time desc
</select> </select>
<select id="getWithdrawalRecord" resultType="cn.wisenergy.model.vo.WithdrawalRecordVo"> <select id="getWithdrawalRecord" resultType="cn.wisenergy.model.vo.WithdrawalRecordVo">
......
...@@ -9,6 +9,7 @@ import cn.wisenergy.model.app.User; ...@@ -9,6 +9,7 @@ import cn.wisenergy.model.app.User;
import cn.wisenergy.model.app.UserDataInfo; import cn.wisenergy.model.app.UserDataInfo;
import cn.wisenergy.service.Manager.UserDataInfoManager; import cn.wisenergy.service.Manager.UserDataInfoManager;
import cn.wisenergy.service.app.AerialDeliveryUserService; import cn.wisenergy.service.app.AerialDeliveryUserService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -45,7 +46,7 @@ public class AerialDeliveryUserServiceImpl implements AerialDeliveryUserService ...@@ -45,7 +46,7 @@ public class AerialDeliveryUserServiceImpl implements AerialDeliveryUserService
* 随机邀请人要求 1:注册时间早于当前用户 * 随机邀请人要求 1:注册时间早于当前用户
* *
*/ */
// @XxlJob() @XxlJob("aerialDeliveryUserRandjobhandler")
@Override @Override
public void aerialDeliveryUserRand(){ public void aerialDeliveryUserRand(){
log.info("shop-mall[]UserServiceImpl[]aerialDeliveryUserRand[]"); log.info("shop-mall[]UserServiceImpl[]aerialDeliveryUserRand[]");
......
...@@ -57,6 +57,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper, User> impleme ...@@ -57,6 +57,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper, User> impleme
@Override @Override
@Transactional @Transactional
public void userLevelUpgrade(String userId) { public void userLevelUpgrade(String userId) {
log.info("--------------------当前用户id:"+userId);
//当前用户对象 //当前用户对象
User user = usersMapper.getByUserId(userId); User user = usersMapper.getByUserId(userId);
//当前用户直推表对象 //当前用户直推表对象
...@@ -65,6 +66,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper, User> impleme ...@@ -65,6 +66,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper, User> impleme
TeamUserInfo teamUserInfoMapperByUserId = teamUserInfoMapper.getByUserId(userId); TeamUserInfo teamUserInfoMapperByUserId = teamUserInfoMapper.getByUserId(userId);
//当前用户等级 //当前用户等级
Integer userLevel = user.getUserLevel(); Integer userLevel = user.getUserLevel();
log.info("---------------当前用户等级:"+userLevel);
//当前用户的累计消费 //当前用户的累计消费
BigDecimal performanceByUserid = new BigDecimal(0); BigDecimal performanceByUserid = new BigDecimal(0);
if (userLevel == 0){ if (userLevel == 0){
...@@ -76,7 +78,8 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper, User> impleme ...@@ -76,7 +78,8 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper, User> impleme
} }
//当前用户的推荐人邀请码 //当前用户的推荐人邀请码
String beInvitedCode = user.getBeInvitedCode(); String beInvitedCode = user.getBeInvitedCode();
// log.info("--------------------当前用户的邀请码:"+beInvitedCode);
String inviteUserId = ""; String inviteUserId = "";
RecommendUser inviteRecommendUser = new RecommendUser(); RecommendUser inviteRecommendUser = new RecommendUser();
//若当前用户的推荐人邀请码是 “1” 时 则当前用户没有邀请人 //若当前用户的推荐人邀请码是 “1” 时 则当前用户没有邀请人
...@@ -85,6 +88,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper, User> impleme ...@@ -85,6 +88,7 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper, User> impleme
User byBeInvitedCode = usersMapper.getByBeInvitedCode(beInvitedCode); User byBeInvitedCode = usersMapper.getByBeInvitedCode(beInvitedCode);
if (null != byBeInvitedCode) { if (null != byBeInvitedCode) {
inviteUserId = byBeInvitedCode.getUserId(); inviteUserId = byBeInvitedCode.getUserId();
log.info("-------------------推荐人userid"+inviteUserId);
//邀请人的直推用户信息 //邀请人的直推用户信息
inviteRecommendUser = recommendUserMapper.getByUserId(inviteUserId); inviteRecommendUser = recommendUserMapper.getByUserId(inviteUserId);
} }
...@@ -662,7 +666,6 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper, User> impleme ...@@ -662,7 +666,6 @@ public class UserLevelServiceImpl extends ServiceImpl<UsersMapper, User> impleme
cultivatingPrizeInfo.setSeedling(seedling); cultivatingPrizeInfo.setSeedling(seedling);
cultivatingPrizeInfoMapper.updateById(cultivatingPrizeInfo); cultivatingPrizeInfoMapper.updateById(cultivatingPrizeInfo);
} }
} }
} }
} else if (2 == level) { } else if (2 == level) {
......
...@@ -11,7 +11,6 @@ import cn.wisenergy.model.app.TradeRecord; ...@@ -11,7 +11,6 @@ import cn.wisenergy.model.app.TradeRecord;
import cn.wisenergy.model.enums.TradeRecordEnum; import cn.wisenergy.model.enums.TradeRecordEnum;
import cn.wisenergy.model.vo.*; import cn.wisenergy.model.vo.*;
import cn.wisenergy.service.app.WalletService; import cn.wisenergy.service.app.WalletService;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -110,7 +109,7 @@ public class WalletServiceImpl implements WalletService { ...@@ -110,7 +109,7 @@ public class WalletServiceImpl implements WalletService {
return R.error("入参为空!"); return R.error("入参为空!");
} }
//获取包括本月在内的六个月的收益 //获取包括本月在内的六个月的收益
List<AccumulatedIncomeVo> list = tradeRecordMapper.getSixMonthIncome(userId); List<AccumulatedIncomeVo> list = tradeRecordMapper.getSixMonthIncome(userId);
return R.ok(list); return R.ok(list);
} }
......
...@@ -13,7 +13,6 @@ import lombok.extern.slf4j.Slf4j; ...@@ -13,7 +13,6 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
/** /**
...@@ -21,7 +20,6 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -21,7 +20,6 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@Api(tags = "账户管理") @Api(tags = "账户管理")
@RestController @RestController
@RequestMapping("/account")
@Slf4j @Slf4j
public class AccountController extends BaseController { public class AccountController extends BaseController {
@Autowired @Autowired
...@@ -29,7 +27,7 @@ public class AccountController extends BaseController { ...@@ -29,7 +27,7 @@ public class AccountController extends BaseController {
@ApiOperation(value = "获取账户信息", notes = "获取账户信息", httpMethod = "GET") @ApiOperation(value = "获取账户信息", notes = "获取账户信息", httpMethod = "GET")
@ApiImplicitParam(name = "userId", value = "用户id", dataType = "String") @ApiImplicitParam(name = "userId", value = "用户id", dataType = "String")
@GetMapping("/getByUserId") @GetMapping("/account/getByUserId")
public R<AccountInfo> getByUserId(String userId) { public R<AccountInfo> getByUserId(String userId) {
return accountService.getByUserId(userId); return accountService.getByUserId(userId);
} }
...@@ -37,7 +35,7 @@ public class AccountController extends BaseController { ...@@ -37,7 +35,7 @@ public class AccountController extends BaseController {
@ApiOperation(value = "获取账户分页列表", notes = "获取账户分页列表", httpMethod = "GET") @ApiOperation(value = "获取账户分页列表", notes = "获取账户分页列表", httpMethod = "GET")
@ApiImplicitParam(name = "query", value = "查询条件", dataType = "AccountInfoQuery") @ApiImplicitParam(name = "query", value = "查询条件", dataType = "AccountInfoQuery")
@GetMapping("/getList") @GetMapping("admin/account/getList")
public R<PageInfo<AccountInfo>> getList(AccountInfoQuery query) { public R<PageInfo<AccountInfo>> getList(AccountInfoQuery query) {
return accountService.getList(query); return accountService.getList(query);
} }
...@@ -45,7 +43,7 @@ public class AccountController extends BaseController { ...@@ -45,7 +43,7 @@ public class AccountController extends BaseController {
@ApiOperation(value = "设置页-版本更新", notes = "设置页-版本更新", httpMethod = "GET") @ApiOperation(value = "设置页-版本更新", notes = "设置页-版本更新", httpMethod = "GET")
@ApiImplicitParam(name = "version", value = "版本号", dataType = "string") @ApiImplicitParam(name = "version", value = "版本号", dataType = "string")
@GetMapping("/version") @GetMapping("/account/version")
public R<String> version(String version) { public R<String> version(String version) {
if(StringUtils.isBlank(version)){ if(StringUtils.isBlank(version)){
return R.error("入参不能为空!"); return R.error("入参不能为空!");
......
...@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@Api(tags = "会员优惠比列-后台管理") @Api(tags = "会员优惠比列-后台管理")
@RestController @RestController
@RequestMapping("/member") @RequestMapping("/admin/member")
@Slf4j @Slf4j
public class MemberController { public class MemberController {
@Autowired @Autowired
......
...@@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@Api(tags = "后台管理--进步奖") @Api(tags = "后台管理--进步奖")
@RestController @RestController
@RequestMapping("/prize") @RequestMapping("/admin/prize")
@Slf4j @Slf4j
public class PrizeController { public class PrizeController {
@Autowired @Autowired
......
...@@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@Api(tags = "后台管理 -- 应用设置") @Api(tags = "后台管理 -- 应用设置")
@RestController @RestController
@RequestMapping("/set") @RequestMapping("/admin/set")
@Slf4j @Slf4j
public class SettingController { public class SettingController {
@Autowired @Autowired
......
...@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@Api(tags = "团队业绩--后台管理") @Api(tags = "团队业绩--后台管理")
@RestController @RestController
@RequestMapping("/team") @RequestMapping("/admin/team")
@Slf4j @Slf4j
public class TeamController { public class TeamController {
@Autowired @Autowired
......
...@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@Api(tags = "交易流水-后台管理") @Api(tags = "交易流水-后台管理")
@RestController @RestController
@RequestMapping("/trade") @RequestMapping("/admin/trade")
@Slf4j @Slf4j
public class TradeRecordController { public class TradeRecordController {
@Autowired @Autowired
......
...@@ -73,8 +73,8 @@ public class ShiroConfig { ...@@ -73,8 +73,8 @@ public class ShiroConfig {
filterChainDefinitionMap.put("/api/sms/**", "anon"); filterChainDefinitionMap.put("/api/sms/**", "anon");
filterChainDefinitionMap.put("/upload_flowChart/**", "anon");//图片地址 filterChainDefinitionMap.put("/upload_flowChart/**", "anon");//图片地址
filterChainDefinitionMap.put("/userlevel/test", "anon"); filterChainDefinitionMap.put("/userlevel/test", "anon");
//后台设置 //管理端
filterChainDefinitionMap.put("/set/**", "anon"); filterChainDefinitionMap.put("/admin/**", "anon");
filterChainDefinitionMap.put("/customerService/uploadWeChatImg", "anon"); filterChainDefinitionMap.put("/customerService/uploadWeChatImg", "anon");
filterChainDefinitionMap.put("/customerService/service", "anon"); filterChainDefinitionMap.put("/customerService/service", "anon");
......
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